package hy;

import hy.entity.Person;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.env.Environment;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@CrossOrigin
public class MyCtrl {
    @Autowired
    Person p;
    @Autowired
    Environment env;


    @RequestMapping("day1")
    public String m1(){
        System.out.println(env.getProperty("person.name"));
        System.out.println(env.getProperty("person.birth"));

        //return p.toString();
        return "this is day1's data";
    }
}
